/* Used to make sure files are only brought in once */
#ifndef STICK_H
#define STICK_H

#include "IDrawable.h"
#include "Vec3f.h"
#include "Balls.h"
#include "Light.h"

class Point {
public:
   double x;
   double y;
   Point(double _x, double _y)
   {
      x = _x;
      y = _y;
   }
};

class Stick : public IDrawableObject 
{
public:
   Stick(CueBall*);
   ~Stick();
   Vec3f getOrigin();
   void draw(bool, bool movingBalls);
   void drawShadow(Vec3f, Vec3f, int);
   void setAngle(double);
   void setPullBackPercent(double);
   void release();
   double getXOffset();
   double getYOffset();
   void moveXOffset(double);
   void moveYOffset(double);
   Vec3f getVector();
protected:
   CueBall* cueBall;
   double length;
   double tipDiameter;
   double endDiameter;
   double hAngle;
   double vAngle;
   Point** points;
   double pullBackPercent;
   double releaseTime;
   bool active;
   bool hide;
   enum State { READY, HELD, RELEASED, PAUSED, HIDDEN };
   State state;
   Vec3f direction;
   double xOffset;
   double yOffset;
   void makeRotations();
};


#endif
